from antlr4 import *
from io import StringIO
import sys

if sys.version_info[1] > 5:
    from typing import TextIO
else:
    from typing.io import TextIO

from HatErrorStrategy import HatErrorStrategy
from miniSysYParser import miniSysYParser


class HatParser(miniSysYParser):
    def __init__(self, input: TokenStream, output: TextIO = sys.stdout):
        super().__init__(input, output)
        self._errHandler = HatErrorStrategy()
